aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/groups/[groupId]/balances-list.tsx
diff options
context:
space:
mode:
authorLauri Vuorela <lauri.vuorela@gmail.com>2024-02-05 02:16:30 +0100
committerGitHub <noreply@github.com>2024-02-04 20:16:30 -0500
commitbe0964d9e1d110ff647d3d6433835786b88f9435 (patch)
treeeffee8b42f21b9404a7650c68b9d11c91fa32bd8 /src/app/groups/[groupId]/balances-list.tsx
parentfb49fb596a56955ca70eac9da47d2826299469e1 (diff)
format currency with thousand separators (#81)
Diffstat (limited to 'src/app/groups/[groupId]/balances-list.tsx')
-rw-r--r--src/app/groups/[groupId]/balances-list.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/groups/[groupId]/balances-list.tsx b/src/app/groups/[groupId]/balances-list.tsx
index 5e7b81b..b795914 100644
--- a/src/app/groups/[groupId]/balances-list.tsx
+++ b/src/app/groups/[groupId]/balances-list.tsx
@@ -1,5 +1,5 @@
import { Balances } from '@/lib/balances'
-import { cn } from '@/lib/utils'
+import { cn, formatCurrency } from '@/lib/utils'
import { Participant } from '@prisma/client'
type Props = {
@@ -28,7 +28,7 @@ export function BalancesList({ balances, participants, currency }: Props) {
</div>
<div className={cn('w-1/2 relative', isLeft || 'text-right')}>
<div className="absolute inset-0 p-2 z-20">
- {currency} {(balance / 100).toFixed(2)}
+ {formatCurrency(currency, balance)}
</div>
{balance !== 0 && (
<div